Class DeviceInfo#getExternalInputList

DeviceInfo

Class Summary
Constructor Attributes Constructor Name and Description
 
DeviceInfo#getExternalInputList(successCallback, errorCallback, options)
Gets external input information.

Class Detail

DeviceInfo#getExternalInputList(successCallback, errorCallback, options)
Gets external input information. external input information includes inputPort, signalDetection, count and currentInputPort. (This API does not support detecting analog inputs.)
// Javascript code
function getExternalInputList () {
  function successCb(cbObject) {
     console.log("cbObject : " + JSON.stringify(cbObject));
     for (var i = 0; i < cbObject.inputSourceList.length; i++) {
        console.log("inputSourceList [" + i + "].inputPort : " + cbObject.inputSourceList[i].inputPort);
        console.log("inputSourceList [" + i + "].signalDetection : " + cbObject.inputSourceList[i].signalDetection);
     }
     console.log("subscribed : " + cbObject.subscribed);
     console.log("count : " + cbObject.count);
     console.log("currentInputPort : " + cbObject.currentInputPort);
  }

  function failureCb(cbObject) {
     var errorCode = cbObject.errorCode;
     var errorText = cbObject.errorText;
     console.log ("Error Code [" + errorCode + "]: " + errorText);
  }

  var options = { subscribe : true };
  var deviceInfo = new DeviceInfo();
  deviceInfo.getExternalInputList(successCb, failureCb, options);
}
Parameters:
{Function} successCallback
success callback function.
{Function} errorCallback
failure callback function.
options
Since:
1.5
Returns:
{Object}
PropertyTypeDescription
inputSourceList[]ArrayExternal input information.
inputSourceList[].inputPortStringInput label (ext://hdmi:1, ext://hdmi:2, ext://dp:1, ext://dvi:1 etc)
inputSourceList[].signalDetectionBooleantrue: detected, false: non-detected
subscribedBooleantrue to indicate subscribed
countNumberNumber of all inputs (now include only digital inputs)
currentInputPortBooleanInput label of the input that is currently selected.
See: